package com.lms.desiginmode.factory.model.shape;

import com.lms.desiginmode.factory.model.AbstractFactory;
import com.lms.desiginmode.factory.model.color.Color;

/**
 * @Author: 李孟帅
 * @CreateTime: 2020-12-10 11:07
 * @Description:
 */
public class ShapeFactory extends AbstractFactory {
    private static final String CIRCLE="CIRCLE";
    private static final String SQUARE="SQUARE";
    private static final String RECTANGLE="RECTANGLE";

    @Override
    public Color getColor(String type) {
        return null;
    }

    @Override
    public  Shape getShape(String type){
        if (CIRCLE.equals(type)){
            return new Circle();
        }else if (SQUARE.equals(type)){
            return new Square();
        }else if(RECTANGLE.equals(type)){
            return new Rectangle();
        }
        return null;
    }
}
